package com.time.workshop.ui;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

import com.time.workshop.R;
import com.time.workshop.SuperActivity;
import com.time.workshop.injector.Injector;
import com.time.workshop.injector.V;
import com.time.workshop.view.TabHeadView;

public class AddOrderActivity extends SuperActivity implements OnClickListener
{

	@V
	private TabHeadView bv_addorder_back;
	@V
	private EditText et_addorder_content, et_addorder_name, et_addorder_idnumber, et_addorder_phone;
	@V
	private Button btn_addorder_ok;

	private String content, name, idnumber, phone;

	@Override
	protected void onCreate(Bundle bundle)
	{
		super.onCreate(bundle);
		setContentView(R.layout.activity_addorder);
		init();
	}

	@Override
	public void onClick(View view)
	{
		super.onClick(view);
		switch (view.getId())
		{
		case R.id.btn_addorder_ok:
			content = et_addorder_content.getText().toString().trim();
			name = et_addorder_name.getText().toString().trim();
			idnumber = et_addorder_idnumber.getText().toString().trim();
			phone = et_addorder_phone.getText().toString().trim();
			break;

		default:
			break;
		}
	}

	private void init()
	{
		Injector.getInstance().inject(this);
		bv_addorder_back.getLeftButton().setBackgroundResource(R.drawable.btn_back1_normal);
		bv_addorder_back.getRightButton().setVisibility(View.GONE);
		bv_addorder_back.getLeftButton().setOnClickListener(new OnClickListener()
		{

			@Override
			public void onClick(View arg0)
			{
				back();
			}
		});
		btn_addorder_ok.setOnClickListener(this);
	}

}
